SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwtlocalesporcontruccion
AS
SELECT     dbo.u_f3_00_varios.Id, dbo.u_f2_00_varios.idCui, dbo.u_f3_00_varios.[Local], dbo.u_f3_00_varios.Planta, dbo.u_tp_tipo_local.descripcion AS Tipo, 
                      dbo.u_f3_00_varios.superficie, dbo.u_tp_respuesta.descripcion AS LocalSinUso
FROM         dbo.u_f3_00_varios INNER JOIN
                      dbo.u_tp_tipo_local ON dbo.u_f3_00_varios.idTipoLocal = dbo.u_tp_tipo_local.Id INNER JOIN
                      dbo.u_f2_00_varios ON dbo.u_f3_00_varios.Idconstruccion = dbo.u_f2_00_varios.Id LEFT OUTER JOIN
                      dbo.u_tp_respuesta ON dbo.u_f3_00_varios.localSinUso = dbo.u_tp_respuesta.Id
GO
GRANT SELECT ON  [dbo].[vwtlocalesporcontruccion] TO [Cenie]
GO
